package top.hitotright.hadoop;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class DateTemperatureGroupingComparator extends WritableComparator {
	
	@Override
	public int compare(WritableComparable a, WritableComparable b) {
		// TODO 自动生成的方法存根
		DateTemperaturePair pair = (DateTemperaturePair) a;
        DateTemperaturePair pair2 = (DateTemperaturePair) b;
        return pair.getYearMonth().compareTo(pair2.getYearMonth());
	}

}
